import {createRouter, createWebHashHistory} from 'vue-router'

const routes = [
    {
        path: '/:error*',
        name: 'Error404',
        component: () => import('@/pages/error/404.vue'),
        meta: {
            isLogin: false
        }
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/pages/login/index.vue'),
        meta: {
            isLogin: false
        }
    },
    {
        path: '/',
        redirect: '/overview',
        component: () => import('@/pages/index/index.vue'),
        children: [
            {
                path: '/overview',
                name: 'Overview',
                component: () => import('@/pages/overview/index.vue'),
                meta: {
                    isLogin: true
                }
            }
        ],
    },
]
export default createRouter({
    history: createWebHashHistory(),
    routes
})
